package com.deercrowing.takeaway.entity;

import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;

/**
 * 订单表(Orders)表实体类
 *
 * @author guoyongxiang
 * @since 2024-07-11 16:05:26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_orders")
public class OrdersEntity extends Model<OrdersEntity> {
    //ID，唯一标识    
    @TableId
    private Long id;
    //订单号    
    @TableField("number")
    private String number;
    //订单状态，0未接单、1已接单、2未付款、3已付款、4制作中、5制作完成、6派送中、7派送完成、8未评价、9评价完成、10退款    
    @TableField("status")
    private Short status;
    //下单用户    
    @TableField("user_id")
    private Long userId;
    //下单时间    
    @TableField("order_time")
    private LocalDateTime orderTime;
    //结账时间    
    @TableField("checkout_time")
    private LocalDateTime checkoutTime;
    //支付方式 1微信、2支付宝    
    @TableField("pay_method")
    private Short payMethod;
    //订单支付状态，0未支付、1支付完成    
    @TableField("pay_status")
    private Short payStatus;
    //总金额    
    @TableField("amount")
    private Double amount;
    //备注    
    @TableField("remark")
    private String remark;
    //手机号    
    @TableField("phone")
    private String phone;
    //订单地址ID
    @TableField("address_id")
    private Long addressId;
    //订单地址
    @TableField("address")
    private String address;
    //用户名称    
    @TableField("user_name")
    private String userName;
    //收货人    
    @TableField("consignee")
    private String consignee;
    //订单取消原因    
    @TableField("cancel_reason")
    private String cancelReason;
    //订单拒绝原因    
    @TableField("rejection_reason")
    private String rejectionReason;
    //订单取消时间    
    @TableField("cancel_time")
    private LocalDateTime cancelTime;
    //预计送达时间    
    @TableField("estimated_delivery_time")
    private LocalDateTime estimatedDeliveryTime;
    //配送状态  1立即送出  0选择具体时间    
    @TableField("delivery_status")
    private Integer deliveryStatus;
    //送达时间    
    @TableField("delivery_time")
    private LocalDateTime deliveryTime;
    //打包费    
    @TableField("pack_amount")
    private Short packAmount;
    //餐具数量    
    @TableField("tableware_number")
    private Short tablewareNumber;
    //餐具数量状态  1按餐量提供  0选择具体数量    
    @TableField("tableware_status")
    private Integer tablewareStatus;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    
}

